﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using Newtonsoft.Json;
using Pay.TO;

namespace Pay.DTO {
    /// <summary>
    /// 发货信息：mc_Shipping
    /// </summary>
    [Serializable]
    public class shippingaddress_dto {
        /// <summary>
        /// ID
        /// </summary>
        public long id { get; set; }
        /// <summary>
        /// 用户ID
        /// </summary>
        public long merchant_id { get; set; }
        /// <summary>
        /// 区域Id
        /// </summary>
        public long region_id { get; set; }
        /// <summary>
        /// 收货人
        /// </summary>
        public string shipto { get; set; }
        /// <summary>
        /// 收货具体街道信息
        /// </summary>
        public string address { get; set; }
        /// <summary>
        /// 收货人电话
        /// </summary>
        public string phone { get; set; }
        /// <summary>
        /// 是否为默认
        /// </summary>
        public bool is_default { get; set; }
        /// <summary>
        /// 身份证号码
        /// </summary>
        public string id_card { get; set; }
        /// <summary>
        /// 身份证反面
        /// </summary>
        public string card_negative { get; set; }
        /// <summary>
        /// 身份证正面
        /// </summary>
        public string card_positive { get; set; }
        /// <summary>
        /// 真实姓名
        /// </summary>
        public string real_name { get; set; }

        public virtual region_dto region { get; set; }
    }
    /// <summary>
    /// token 收货地址
    /// </summary>
    [Serializable]
    [JsonObject(MemberSerialization.OptOut)]
    public class shipping_address_dto {
        public shipping_address_dto() {
        }

        /// <summary>
        /// 
        /// </summary>
        public long id { get; set; }
        /// <summary>
        /// 用户ID
        /// </summary>
        [JsonIgnore]
        public long user_id { get; set; }
        /// <summary>
        /// 省ID
        /// </summary>
        [Required(ErrorMessage = "请选择省份")]
        public long province_id { get; set; }
        /// <summary>
        /// 市ID
        /// </summary>
        [Required(ErrorMessage = "请选择城市")]
        public long city_id { get; set; }
        /// <summary>
        /// 区域ID
        /// </summary>
        public long area_id { get; set; }
        /// <summary>
        /// 收货人
        /// </summary>
        [Required(ErrorMessage = "请填写收货人姓名")]
        public string ship_to { get; set; }
        /// <summary>
        /// 收货具体街道信息
        /// </summary>
        [Required(ErrorMessage = "请填写收货具体街道信息")]
        public string address { get; set; }
        /// <summary>
        /// 收货人电话
        /// </summary>
        [Required(ErrorMessage = "请填写收货联系电话")]
        public string phone { get; set; }
        /// <summary>
        /// 是否为默认
        /// </summary>
        public bool is_default { get; set; }
        /// <summary>
        /// 区域名称（省市区）
        /// </summary>
        public string region_name { get; set; }
        /// <summary>
        /// 身份证号码
        /// </summary>
        //[JsonIgnore]
        public string id_card { get; set; }
        /// <summary>
        /// 身份证反面
        /// </summary>
        [JsonIgnore]
        public string card_negative { get; set; }
        /// <summary>
        /// 身份证正面
        /// </summary>
        [JsonIgnore]
        public string card_positive { get; set; }
        /// <summary>
        /// 真实姓名
        /// </summary>
        //[JsonIgnore]
        public string real_name { get; set; }
    }
}